﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Input;

namespace Worms3003
{
    public class Sounds
    {
        Song music;
        public bool mudança = false;
        bool tocando = false;

        public Sounds(Song newMusic)
        {
            music = newMusic;
        }

        public void Update()
        {
            KeyboardState keyboard = Keyboard.GetState();

            if (/*keyboard.IsKeyDown(Keys.P) && */!tocando && !mudança)
            {
                tocando = true;
                MediaPlayer.Play(music);
            }

            MediaPlayer.IsRepeating = true;
        }
    }
}
